package com.norman.sorry.core.cards;

import java.util.Arrays;

/**
 * A final factory class that provides methods to creating different decks of
 * cards.
 * 
 * @author Brian Norman
 * @version 0.0.1 beta
 * @since 0.0.1 beta
 */
public final class DeckFactory {

   /**
    * Private constructor so no one can create an instance of this class.
    */
   private DeckFactory() {
   }

   /**
    * Returns a new deck of the standard list of cards. This deck contains four
    * of every card.
    * 
    * @return a new deck of the standard list of cards.
    */
   public static AbstractDeck createStandard() {
      /** @formatter:off */
      return new AbstractDeck(Arrays.asList(
            StaticCards.ONE, StaticCards.ONE, StaticCards.ONE, StaticCards.ONE,
            StaticCards.TWO, StaticCards.TWO, StaticCards.TWO, StaticCards.TWO,
            StaticCards.THREE, StaticCards.THREE, StaticCards.THREE, StaticCards.THREE,
            StaticCards.FOUR, StaticCards.FOUR, StaticCards.FOUR, StaticCards.FOUR,
            StaticCards.FIVE, StaticCards.FIVE, StaticCards.FIVE, StaticCards.FIVE,
            StaticCards.SEVEN, StaticCards.SEVEN, StaticCards.SEVEN, StaticCards.SEVEN,
            StaticCards.EIGHT, StaticCards.EIGHT, StaticCards.EIGHT, StaticCards.EIGHT,
            StaticCards.TEN, StaticCards.TEN, StaticCards.TEN, StaticCards.TEN,
            StaticCards.ELEVEN, StaticCards.ELEVEN, StaticCards.ELEVEN, StaticCards.ELEVEN,
            StaticCards.TWELVE, StaticCards.TWELVE, StaticCards.TWELVE, StaticCards.TWELVE,
            StaticCards.SORRY, StaticCards.SORRY, StaticCards.SORRY, StaticCards.SORRY)) {
      };
      /** @formatter:on */
   }

   /**
    * Returns a new deck of the extended list of cards. This deck contains four
    * of every card plus one extra one card.
    * 
    * @return a new deck of the extended list of cards.
    */
   public static AbstractDeck createExtended() {
      /** @formatter:off */
      return new AbstractDeck(Arrays.asList(
            StaticCards.ONE, StaticCards.ONE, StaticCards.ONE, StaticCards.ONE, StaticCards.ONE,
            StaticCards.TWO, StaticCards.TWO, StaticCards.TWO, StaticCards.TWO,
            StaticCards.THREE, StaticCards.THREE, StaticCards.THREE, StaticCards.THREE,
            StaticCards.FOUR, StaticCards.FOUR, StaticCards.FOUR, StaticCards.FOUR,
            StaticCards.FIVE, StaticCards.FIVE, StaticCards.FIVE, StaticCards.FIVE,
            StaticCards.SEVEN, StaticCards.SEVEN, StaticCards.SEVEN, StaticCards.SEVEN,
            StaticCards.EIGHT, StaticCards.EIGHT, StaticCards.EIGHT, StaticCards.EIGHT,
            StaticCards.TEN, StaticCards.TEN, StaticCards.TEN, StaticCards.TEN,
            StaticCards.ELEVEN, StaticCards.ELEVEN, StaticCards.ELEVEN, StaticCards.ELEVEN,
            StaticCards.TWELVE, StaticCards.TWELVE, StaticCards.TWELVE, StaticCards.TWELVE,
            StaticCards.SORRY, StaticCards.SORRY, StaticCards.SORRY, StaticCards.SORRY)) {
      };
      /** @formatter:on */
   }

}
